package org.blogsite.greencode.service.impl;

import java.util.Iterator;
import java.util.List;

import org.blogsite.greencode.bean.TeachingSupport_Course;
import org.blogsite.greencode.dao.TeachingSupport_CourseDao;
import org.blogsite.greencode.service.TeachingSupport_CourseService;

public class TeachingSupport_CourseServiceImpl implements TeachingSupport_CourseService {
	
	private TeachingSupport_CourseDao courseDao;

	public TeachingSupport_CourseDao getCourseDao() {
		return courseDao;
	}

	public void setCourseDao(TeachingSupport_CourseDao courseDao) {
		this.courseDao = courseDao;
	}
	//教学课程-保存
	public void save(TeachingSupport_Course course) {
		
		courseDao.save(course);
	}
	//教学课程-查询
	public Iterator search(String keyWord){
		return courseDao.search(keyWord);
	}
	//教学课程-修改
	public void modify(TeachingSupport_Course course){
		courseDao.modify(course);
	}
	//教学课程-删除
	public void delete(int cno){
		courseDao.delete(cno);
	}

	public List allSearch() {
		return courseDao.allSearch();
	}

	public List byBlearSearch(String text) {
		return courseDao.byBlearSearch(text);
	}

	public List byIdSearch(int id) {
		return courseDao.byIdSearch(id);
	}

	public List byNameSearch(String name) {
		return courseDao.byNameSearch(name);
	}
	/*查询指定名称的课程是否存在*/
	public boolean searchCourseByName(String name){
		return courseDao.searchCourseByName(name);
	}
	
}
